﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Simple.Common.Extensions;
using Simple.Repository.Models.Attendance;

namespace Simple.Services.System.Recipes.Models
{
    public class PlanDayRecipesModel : ModelBase
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 每周计划食谱id
        /// </summary>
        public Guid PlanWeekRecipesId { get; set; }

        /// <summary>
        /// 日期（：2023-01-01）
        /// </summary>
        public string Date { get; set; }

        /// <summary>
        /// 日期（：星期一）
        /// </summary>
        public string DateStr { get; set; }

        /// <summary>
        /// 就餐人数
        /// </summary>
        public int Number { get; set; }

        public List<PlanDayRecipesDetailModel> PlanDayRecipesDetails { get; set; }
        public NutritionalAnalysisDto NutritionalAnalysisDto { get; set; }


        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<PlanDayRecipesModel, PlanDayRecipes>();

            profile.CreateMap<PlanDayRecipes, PlanDayRecipesModel>();

            profile.CreateMap<PlanDayRecipesDetailModel, PlanDayRecipesDetail>();
            profile.CreateMap<PlanDayRecipesDetail, PlanDayRecipesDetailModel>();
        }
    }

    public class PlanDayRecipesDetailModel : ModelBase
    {
        public Guid Id { get; set; }

        /// <summary>
        /// 类型
        /// </summary>
        public EnumRecipes Type { get; set; }

        public List<RecipesModel> Recipes { get; set; }



        public override void ConfigureMapper(Profile profile)
        {
            profile.CreateMap<RecipesModel, Simple.Repository.Models.Recipes>();

            profile.CreateMap<Simple.Repository.Models.Recipes, RecipesModel>();

        }
    }





}
